<!-- 左侧面板 -->
<template>
  <ModelTile class="hyqk" title="项目现场" :is-download="false" :is-more="false">
    <z-input-search v-model:value="value" placeholder="请输入工程名称" @onSearch="onSearch" />
    <div class="hyqk-content scrollbar">
      <div class="imgrongqi">
        
		
		<div class="img-item" v-for="item in 20" :key="item">
		  <img :src="getImage('miss')" />
		</div>
		
      </div>
    </div>
  </ModelTile>
</template>
<script lang="ts">
import { ref, defineComponent, computed ,inject} from 'vue'
import ModelTile from '@/components/modleTitle/index.vue'
import ZInputSearch from '@/components/z-input-search/index.vue'

import { useRouter } from 'vue-router'

const httpApi: any = inject('$http')
const listDataBank = ref([])
function getInitData() {
  /**
  httpApi.cityFixedAssets2Api
    .projectSite({})
    .then((res: any) => {
      if (res.success) {
        listDataBank.value = res.body || []
      } else {
        console.error('系统异常')
      }
    })
    .catch((err: any) => {
      console.error(err || '系统异常')
    })
	*/
    listDataBank.value = [
      { name: 'xxx', completed: '实际完成投资10亿' },
      { name: 'xxx', completed: '实际完成投资8亿' },
      { name: 'xxx', completed: '实际完成投资6亿' }
    ];
}
getInitData()

export default defineComponent({
  name: 'hyqk',
  components: {
    ModelTile,
    ZInputSearch
  },
  props: {
    // 父级统计数据
    statAllData: {
      type: Object,
      default: {}
    }
  },
  setup(props) {
    const router = useRouter()

	const listData = listDataBank;
	
    const value = ref<string>('')

    const onSearch = (searchValue: string) => {
      console.log('use value', searchValue)
    }
    // 获取icon
    function getImage(name: string) {
      return new URL(`/src/assets/images/cityFixedAssets/${name}.png`, import.meta.url).href
    }
    return {
      value,
      getImage,
      onSearch
    }
  }
})
</script>
<style lang="scss" scoped>
.onDownloa {
  display: none !important;
}

.ant-input-search .ant-input:hover,
.ant-input-search .ant-input:focus {
  color: #fff !important;
}

.imgrongqi {
 

  .img-item {
        width: 31%;
        height: 264vh * $Bh;
        border: 2vw * $Bw solid #3886f2;
        float: left;
        margin-right: 15vw * $Bw;
        margin-top: 40vh * $Bh;
        img {
          width: 100%;
          height: 100%;
        }
      }
}

.hyqk {
  color: #fff;
  margin-bottom: 40vh * $Bh;

  :deep(.content) {
    height: 1070vh * $Bh;
    background-color: initial;
    border-radius: 0;
    padding: 0;
  }

  :deep(.z-table) {
    .ant-table {
      .ant-table-container {
        table {
          .ant-table-thead {
            .ant-table-cell {
              padding: 25vh * $h 0;
              font-size: 32vh * $Bh;
            }
          }

          th {
            background-color: #213b76 !important;
          }

          .ant-table-tbody > tr > td {
            font-size: 32vh * $Bh !important;
          }

          .ant-table-tbody > tr:nth-child(even) {
            background-color: #213b76;
          }
        }
      }
    }
  }

  .hyqk-content {
    height: 100%;

    .tz {
      display: flex;
      align-items: center;
      height: 30vh * $h;
      padding-bottom: 3vh * $h;

      img {
        width: 25vh * $h;
        height: 25vh * $h;
      }
    }
  }
}
</style>
